package qp.src.app.server;

import com.google.web.bindery.requestfactory.shared.Locator;

public class DataBeanLocator extends Locator<DataBean, Integer>{

  @Override
  public DataBean create(Class<? extends DataBean> clazz) {
    return new DataBean();
  }

  @Override
  public DataBean find(Class<? extends DataBean> clazz, Integer id) {
    return EntityService.findDataBean(id);
  }

  @Override
  public Class<DataBean> getDomainType() {
    return DataBean.class;
  }

  @Override
  public Integer getId(DataBean domainObject) {
    return domainObject.getId();
  }

  @Override
  public Class<Integer> getIdType() {
    return Integer.class;
  }

  @Override
  public Object getVersion(DataBean domainObject) {
    return domainObject.getVersion();
  }

}
